@extends('layout.front')
@section('title','往期视频详情')
@section('head')
    <div class="nav">
        <ul class="nav_body">
            <li><a href="/">首页</a></li>
            <li><a href="/master-lecture">名家讲堂</a></li>
            <li><a href="/master">名家风采</a></li>
            <li><a class="current" href="/video">往期视频</a></li>
        </ul>
    </div>
@endsection
@section('content')
    @if($oVideo==null)
        <div class="main">
            <div class="past_top clearfix">
                <div class="past_left">
                    <div class="past_left_title">视频不存在</div>
                </div>
            </div>
        </div>
    @else
    <div class="main">
        <div class="past_top clearfix">
            <div class="past_left">
                <div class="past_left_title">{{$oVideo->name}}</div>
                <div class="past_left_video">
                    <div class="video" style="width: 600px;height: 400px;"></div>
                    <script type="text/javascript">
                        //定义一个变量：videoObject，用来做为视频初始化配置
                        var videoObject = {
                            container: '.video', //“#”代表容器的ID，“.”或“”代表容器的class
                            video: '{{$oVideo->video}}'//视频地址
                        };
                        new ckplayer(videoObject);//初始化播放器
                    </script>
                </div>
                <div class="online_class_share">
                    <span>分享到：</span>
                    <a href="javascript:void(show())"><img src="/assets/images/icon_weixin.jpg" /></a>
                </div>
            </div>
            <div class="past_right">
                <div class="past_intro">
                    <div class="title_box">本期简介</div>
                    <div class="past_intro_body">
                        <p>{{$oVideo->show}}</p>
                    </div>
                </div>
                <div class="past_other">
                    <div class="past_other_title">其他讲堂</div>
                    <div class="past_other_list">
                        <div class="past_other_ship">
                            <a href="/video-show/{{$oVideo->id+1}}"><img src="{{$oVideo->image}}" /></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="past_export">
            <div class="title_box">本期嘉宾</div>
            @foreach($oVideo->comment as $v)
            <div class="export_this_list">
                <div class="export_this_ship clearfix">
                    <div class="left_export"><img width="270" height="160" src="{{$v->img}}" /></div>
                    <div class="right_export">
                        <div class="export_base">
                            <p class="name">{{$v->name}} {{$v->zhiwu}}</p>
                            <p><b>科室：</b>{{$v->keshi}}</p>
                            <p><b>职称：</b>{{$v->zhicheng}}</p>
                        </div>
                        <div class="export_this_intro">
                            <?php echo $v->show?>
                            <div class="export_edu clearfix">
                                <div class="edu_title">接受教育：{{$v->email}}</div>
                                <div class="edu_info">
                                    <br>
                                    <br>
                                    <p><a href="/master-show/{{$v->id}}">【详情】</a></p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            @endforeach
        </div>
        <div class="shadow" id="shadow" style="display:none"></div>
        <div class="chat_pop" style="display:none" id="chat_pop">
            <div class="chat_pop_top"><a href="javascript:void(hide())" class="chat_pop_close"></a></div>
            <div class="chat_pop_body">
                <img src="/assets/images/shouye.png" />
                <p>使用微信扫一扫，并将网页分享给好友</p>
            </div>
        </div>
    </div>
    @endif
    <script>
    function show(){
        document.getElementById("shadow").style.display="";//设置空字符，显示
        document.getElementById("chat_pop").style.display="";
    }
    function hide(){
        document.getElementById("shadow").style.display="none";
        document.getElementById("chat_pop").style.display="none";
    }
    </script>
@endsection

